/**  
 * All rights Reserved, Designed By <a href="www.itttq.com" target="_blank">www.itttq.com</a>
 * @date:   2017-07-21 11:42:21
 * @Copyright: 2017 <a href="www.itttq.com" target="_blank">www.itttq.com</a> Inc. All rights reserved. 
 */
package com.itttq.gshop.pbpm.mapper;

import java.util.List;

import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.DeleteProvider;
import org.apache.ibatis.annotations.InsertProvider;
import org.apache.ibatis.annotations.Lang;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.SelectProvider;
import org.apache.ibatis.annotations.UpdateProvider;

import com.itttq.gshop.domain.po.SmsCategoryPo;
import com.itttq.gshop.pbpm.cmpt.mybatis.CustomInLanguage;
import com.itttq.gshop.pbpm.provider.SmsCategorySqlProvider;

@Mapper
public interface ISmsCategoryMapper {
	/**
	 * 新增SmsCategoryPo对象
	 * 
	 * @param SmsCategoryPo
	 * @Author 迷蝶
	 * @return Integer
	 */
	@InsertProvider(type=SmsCategorySqlProvider.class,  method="addSmsCategory") 
	public Integer addSmsCategory(SmsCategoryPo smsCategory);

	/**
	 * 更新SmsCategoryPo对象
	 * 
	 * @param smsCategoryPo
	 * @Author 迷蝶
	 * @return Integer
	 */
	@UpdateProvider(type=SmsCategorySqlProvider.class,  method="updateSmsCategory") 
	public Integer updateSmsCategory(SmsCategoryPo smsCategory);
	
	/**
	 * 根据ID删除SmsCategoryPo对象
	 * 
	 * @param id
	 * @Author 迷蝶
	 * @return Integer
	 */
	@DeleteProvider(type=SmsCategorySqlProvider.class,  method="delSmsCategory") 
	public Integer delSmsCategoryById(Integer id);

	/**
	 * 根据IDS删除SmsCategoryPo对象
	 * 
	 * @param ids
	 * @Author 迷蝶
	 * @return List<SmsCategoryPo>
	 */
	@Lang(CustomInLanguage.class)
	@Delete("DELETE FROM sms_category WHERE id IN (#{ids})")
	public Integer delSmsCategoryByIds(@Param("ids") List<Integer> ids);
	
	/**
	 * 根据条件查找SmsCategoryPo对象，默认根据ID降序
	 * 
	 * @param smsCategoryPo
	 * @Author 迷蝶
	 * @return List<SmsCategoryPo>
	 */
	@SelectProvider(type=SmsCategorySqlProvider.class,  method="findSmsCategorys") 
	public List<SmsCategoryPo> findSmsCategorys(SmsCategoryPo smsCategory);
	
	/**
	 * 根据条件查找记录总数
	 * 
	 * @param smsCategoryPo
	 * @Author 迷蝶
	 * @return Integer
	 */
	@SelectProvider(type=SmsCategorySqlProvider.class,  method="findSmsCategoryCount") 
	public Integer findSmsCategoryCount(SmsCategoryPo smsCategory);

	/**
	 * 根据ID查找SmsCategoryPo对象
	 * 
	 * @param id
	 * @Author 迷蝶
	 * @return SmsCategoryPo
	 */
	@SelectProvider(type=SmsCategorySqlProvider.class,  method="findSmsCategoryById") 
	public SmsCategoryPo findSmsCategoryById(Integer id);
	
}